﻿@model AppNet.Models.Category
@{SelectList roots = (SelectList)ViewBag.root; }
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
 <style>
       .editor-label
       
       {
           font-size:medium;
           font-weight:bold;
       }
       </style>
       <script type="text/javascript">
           $(document).ready(function () {
               if ($('#IsRoot').is(':checked')) {
                   $('#root').hide(200);
               }
               else {
                   $('#root').show(200);
               }
               $('#IsRoot').on('click', function (e) {
                   if ($('#IsRoot').is(':checked')) {
                       $('#root').hide(200);
                   }
                   else {
                       $('#root').show(200);
                   }
               })
           });
       </script>

  <div class="editor-label">
         @AppNet.MultiLanguage.Translation.GetInstance.Translate("Title")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>
        <div id="checkroot">
            @Html.CheckBox("IsRoot", true) @AppNet.MultiLanguage.Translation.GetInstance.Translate("CatIsRoot")
        </div>

        <div id="root">
        <div class="editor-label">
       @AppNet.MultiLanguage.Translation.GetInstance.Translate("CatRoot")
        <div class="editor-field">
            @Html.DropDownListFor(model=>model.RootID, roots)
        </div>
        </div>
        </div>
        <div class="editor-label">
            @AppNet.MultiLanguage.Translation.GetInstance.Translate("CatVisible")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsVisible)
            @Html.ValidationMessageFor(model => model.IsVisible)
        </div>
